package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.UserRoleXw;
import com.caigou.bean.cms.param.AssignRoleParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserRoleXwMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserRoleXw record);

    int insertSelective(UserRoleXw record);

    UserRoleXw selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserRoleXw record);

    UserRoleXw findRolesByUserId(String userId);

    UserRoleXw findRoleByUserId(String userId);

    int insertUserRole(UserRoleXw record);

    List<UserRoleXw> findRoleByUserIdAndRowId(AssignRoleParam param);

    List<UserRoleXw> findUserRoleByRoleCodes(@Param("roleCodes") List<String> roleCodes);
}
